PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Window Manager >

Programming With the Mac OS 8.5 Window Manager


IsWindowInStandardState

Determines whether a window is currently zoomed in to the user state or zoomed out to the standard state.

pascal Boolean IsWindowInStandardState (
                     WindowPtr window,
                     Point *idealSize,
                     Rect *idealStandardState);
window
A value of type WindowPtr . Pass a pointer to the window for which you wish to determine the zoom state.
idealSize
A pointer to a structure of type Point . Before calling IsWindowInStandardState , set the Point structure to contain the ideal width and height of the window's content region, regardless of the actual screen device dimensions. If you set idealSize to NULL , IsWindowInStandardState examines the dimensions stored in the stdState field of the WStateData structure.
idealStandardState
A pointer to a structure of type Rect . On return, the rectangle contains the global coordinates for the content region of the window in its standard state, based on the data supplied in the idealSize parameter. You may pass NULL if you do not wish to receive this data.
function result
A value of type Boolean . The IsWindowInStandardState function returns true if the window is currently in its standard state; otherwise, if the window is currently in the user state, IsWindowInStandardState returns false .
DISCUSSION

The IsWindowInStandardState function compares the window's current dimensions to those referred to by the idealSize parameter to determine if the window is currently in the standard state. Your application may use IsWindowInStandardState to decide whether a user's click of the zoom box is a request to zoom to the user state or the standard state, as described in the function ZoomWindowIdeal . Your application may also use IsWindowInStandardState to determine the size and position of the standard state that the Window Manager would calculate for a window, given a specified ideal size; this value is produced in the idealStandardState parameter. See Zooming a Window Gracefully for an example of calling the IsWindowInStandardState function.

VERSION NOTES

Available with Mac OS 8.5 and later.


© 1999 Apple Computer, Inc. – (Last Updated 18 March 99)